package mercede.allBean;
import mercede.allDTOs.HotelDTO;
import mercede.allManagers.HotelManager;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name="hotelbean")
@javax.faces.bean.SessionScoped



public class hotelBean {
	
	@EJB
	HotelManager hotelmgr;
	HotelDTO hoteldto;
	

    
	private String city; 

      
	   
    public hotelBean() {
    	hoteldto = new HotelDTO();
    }
    
  

    public String getCity() {  
        return city;  
    }  
  
    public void setCity(String city) {  
        this.city = city;  
    }  
     

  public HotelDTO getHoteldto() {
         return hoteldto;
 }
	 
	 public void setHoteldto(HotelDTO hoteldto)
	 {
		 this.hoteldto=hoteldto;
	 }
 
 
 
public List<HotelDTO> getListHotelkDTO(){
    return hotelmgr.getListHotelDTO();
}

public List<?> getListgetHotel() {
    return  hotelmgr.getHotel();
}

public List<HotelDTO> getListHotelDTOByDest()
{
	
	return hotelmgr.getListHotelDTOByDest(city);
	}



public void  remove(int ddd){
	
	hotelmgr.remove(ddd);
}

 

 public String register() {
	 hotelmgr.save(hoteldto);
         return "";
 }

}
